﻿namespace Jim.K3Cloud;

/// <summary>
/// 获取领域模型列表
/// </summary>
[Sdk("Kingdee.BOS.ServiceFacade.ServicesStub.Metadata.MetadataService.GetDomainModeList", "获取领域模型列表")]
public class K3CloudGetDomainModeListRequest : ISdkRequest<K3CloudGetDomainModeListResponse>
{
    public List<int> ModelIds { get; set; }

    public void Validate()
    {
    }
}

public class K3CloudGetDomainModeListResponse : SdkResponse<List<K3CloudDomainModel>>
{
}


/// <summary>领域元模型</summary>
[Serializable]
public class K3CloudDomainModel
{
    /// <summary>单据</summary>
    public const int ModelTypeId_Bill = 100;
    /// <summary>基础资料</summary>
    public const int ModelTypeId_BaseData = 400;
    /// <summary>动态表单</summary>
    public const int ModelTypeId_DynamicForm = 500;
    /// <summary>过滤条件框</summary>
    public const int ModelTypeSubId_Filter = 502;
    /// <summary>工作流</summary>
    public const int ModelTypeId_WorkFlow = 300;
    /// <summary>工作流</summary>
    public const int ModelTypeId_IBPM = 360;
    /// <summary>系统参数</summary>
    public const int ModelTypeId_SysParam = 220;
    /// <summary>套打</summary>
    public const int ModelTypeId_NotePrint = 600;
    /// <summary>弹性域</summary>
    public const int ModelTypeId_RelatedFlex = 800;
    /// <summary>业务流程图版本</summary>
    public const int ModelTypeId_BusinessFlowVersion = 760;
    /// <summary>业务流程图设计</summary>
    public const int ModelTypeId_BusinessFlow = 770;
    /// <summary>反写规则</summary>
    public const int ModelTypeId_WriteBack = 780;
    /// <summary>转换规则</summary>
    public const int ModelTypeId_ConvertRule = 790;
    /// <summary>万能报表</summary>
    public const int ModelTypeId_WNReport = 1600;
    /// <summary>简单帐表</summary>
    public const int ModelTypeId_SysReport = 900;

    /// <summary>校验规则类型集合</summary>
    public List<K3CloudFormValidationType> FormValidationTypeList { get; set; }

    /// <summary>元素分组集合</summary>
    public List<K3CloudElementGroup> ElementGroups { get; set; }
    /// <summary>名称</summary>
    public LocaleValue Name { get; set; }

    /// <summary>领域类型编码</summary>
    public int Id { get; set; }

    /// <summary>图标</summary>
    public string ImgKey { get; set; }

    /// <summary>子领域集合</summary>
    public List<K3CloudDomainModelSub> DomainModelSubs { get; set; }

    /// <summary>设计器实现类名</summary>
    public string DesignerClass { get; set; }

    /// <summary>Model 层类名</summary>
    public string ModelClass { get; set; }

    /// <summary>View 层类名</summary>
    public string ViewClass { get; set; }

    /// <summary>Controller 层类名</summary>
    public string Controller { get; set; }

    /// <summary>Model Event代理类名</summary>
    public string ModelEventProxy { get; set; }

    /// <summary>View Event代理类名</summary>
    public string ViewEventProxy { get; set; }

    /// <summary>领域模型对象元数据存取插件类</summary>
    public string MetadataServiceClass { get; set; }

}


/// <summary>校验规则类型</summary>
[Serializable]
public class K3CloudFormValidationType
{

    /// <summary>唯一标识</summary>
    public int Id { get; set; }

    /// <summary>校验规则名称</summary>
    public LocaleValue Name { get; set; }

    /// <summary>校验规则说明</summary>
    public LocaleValue Description { get; set; }

    /// <summary>运行期实现类</summary>
    public string RuntimeClass { get; set; }

    /// <summary>设计期实现类</summary>
    public string DesignerClass { get; set; }

    /// <summary>规则适用的校验时刻</summary>
    public string TimingPoint { get; set; }
}


/// <summary>领域模型子分组</summary>
/// <remarks>用来定义类似于基础资料 - 辅助资料、核算项目等基础资料子种类</remarks>
[Serializable]
public class K3CloudDomainModelSub
{
    /// <summary>子领域类型编码</summary>
    public int Id { get; set; }

    /// <summary>名称</summary>
    public LocaleValue Name { get; set; }

    /// <summary>设计组件</summary>
    public string SubDesignerClass { get; set; }

    /// <summary>图标</summary>
    public string ImgKey { get; set; }

    /// <summary>Model 层类名</summary>
    public string ModelClass { get; set; }

    /// <summary>View 层类名</summary>
    public string ViewClass { get; set; }

    /// <summary>Controller 层类名</summary>
    public string Controller { get; set; }

    /// <summary>Model Event代理类名</summary>
    public string ModelEventProxy { get; set; }

    /// <summary>View Event代理类名</summary>
    public string ViewEventProxy { get; set; }
}



/// <summary>元素分组</summary>
public class K3CloudElementGroup
{
    /// <summary>元素分组编码</summary>
    public int Id { get; set; }

    /// <summary>元素分组名称</summary>
    public string Name { get; set; }

    /// <summary>元素分组包含的元素集合</summary>
    public List<K3CloudElementType> ElementTypes { get; set; }

    /// <summary>元素分组在工具栏上的图标</summary>
    public string ImgKey { get; set; }

}



/// <summary>元素类型</summary>
public class K3CloudElementType
{
    /// <summary>元素分类_业务对象</summary>
    public const int TYPE_FORM = 1;
    /// <summary>元素分类_实体</summary>
    public const int TYPE_ENTITY = 2;
    /// <summary>元素分类_控件</summary>
    public const int TYPE_CONTROL = 3;
    /// <summary>元素分类_字段</summary>
    public const int TYPE_FIELD = 4;
    /// <summary>元素分类_菜单</summary>
    public const int TYPE_BARITEM = 5;
    /// <summary>元素分类_操作 ??</summary>
    public const int TYPE_OPERATION = 6;
    /// <summary>文本</summary>
    public const int ELEMENTTYPE_TEXTFIELD = 1;
    /// <summary>小数</summary>
    public const int ELEMENTTYPE_DECIMALFIELD = 2;
    /// <summary>整数</summary>
    public const int ELEMENTTYPE_INTEGERFIELD = 3;
    /// <summary>日期</summary>
    public const int ELEMENTTYPE_DATEFIELD = 4;
    /// <summary>长日期</summary>
    public const int ELEMENTTYPE_DATETIMEFIELD = 5;
    /// <summary>多行文本</summary>
    public const int ELEMENTTYPE_TEXTAREAFIELD = 6;
    /// <summary>组织</summary>
    public const int ELEMENTTYPE_ORGFIELD = 7;
    /// <summary>复选框</summary>
    public const int ELEMENTTYPE_CHECKBOXFIELD = 8;
    /// <summary>单据编号</summary>
    public const int ELEMENTTYPE_BILLNOFIELD = 12;
    /// <summary>基础资料</summary>
    public const int ELEMENTTYPE_BASEDATAFIELD = 13;
    /// <summary>基础资料属性字段</summary>
    public const int ELEMENTTYPE_BASEPROPERTYFIELD = 14;
    /// <summary>创建人</summary>
    public const int ELEMENTTYPE_CREATERFIELD = 17;
    /// <summary>用户</summary>
    public const int ELEMENTTYPE_USERFIELD = 18;
    /// <summary>批次</summary>
    public const int ELEMENTTYPE_LOTFIELD = 19;
    /// <summary>单价</summary>
    public const int ELEMENTTYPE_PRICEFIELD = 20;
    /// <summary>金额字段</summary>
    public const int ELEMENTTYPE_AMOUNTFIELD = 21;
    /// <summary>数量</summary>
    public const int ELEMENTTYPE_QTYFIELD = 22;
    /// <summary>创建日期</summary>
    public const int ELEMENTTYPE_CREATEDATEFIELD = 26;
    /// <summary>最近修改人</summary>
    public const int ELEMENTTYPE_MODIFYERFIELD = 27;
    /// <summary>最近修改日期</summary>
    public const int ELEMENTTYPE_MODIFYDATEFIELD = 28;
    /// <summary>代理字段</summary>
    public const int ELEMENTTYPE_PROXYFIELD = 39;
    /// <summary>单选辅助资料</summary>
    public const int ELEMENTTYPE_ASSISTANTFIELD = 30;
    /// <summary>多选辅助资料列表</summary>
    public const int ELEMENTTYPE_MULASSISTANTFIELD = 31;
    /// <summary>分组</summary>
    public const int ELEMENTTYPE_GROUPFIELD = 33;
    /// <summary>单据状态字段</summary>
    public const int ELEMENTTYPE_BILLSTATUSFIELD = 40;
    /// <summary>单据类型</summary>
    public const int ELEMENTTYPE_BILLTYPEFIELD = 44;
    /// <summary>大文本字段</summary>
    public const int ELEMENTTYPE_LARGETEXTFIELD = 45;
    /// <summary>基本单位数量</summary>
    public const int ELEMENTTYPE_BASEQTYFIELD = 47;
    /// <summary>业务流程</summary>
    public const int ELEMENTTYPE_BUSINESSFLOWFIELD = 56;
    /// <summary>图片字段</summary>
    public const int ELEMENTTYPE_IMAGEFIELD = 1011;
    /// <summary>附件(文件服务)</summary>
    public const int ELEMENTTYPE_ATTACHMENT = 60014;
    /// <summary>图片（文件服务）字段</summary>
    public const int ELEMENTTYPE_IMAGEFILESERVER = 60015;
    /// <summary>多选附件(文件服务)</summary>
    public const int ELEMENTTYPE_ATTACHMENTS = 60016;
    /// <summary>税务明细单据体</summary>
    public const int ELEMENTTYPE_TAXDETAILSUBENTRYENTITY = 60528;
    /// <summary>拆分数量字段</summary>
    public const int ELEMENTTYPE_DISAFIELD = 41;
    /// <summary>序列号子单据体</summary>
    public const int ELEMENTTYPE_SNSUBENTRYENTITY = 60531;
    /// <summary>多选基础资料</summary>
    public const int ELEMENTTYPE_MULBASEDATAFIELD = 24;
    /// <summary>多类别基础资料列表</summary>
    public const int ELEMENTTYPE_ITEMTYPECLASSFIELD = 15;
    /// <summary>多类别基础资料</summary>
    public const int ELEMENTTYPE_ITEMCLASSFIELD = 16;
    /// <summary>下拉列表字段</summary>
    public const int ELEMENTTYPE_COMBOFIELD = 9;
    /// <summary>多选下拉列表</summary>
    public const int ELEMENTTYPE_MULCOMBOFIELD = 29;
    /// <summary>多语言文本字段</summary>
    public const int ELEMENTTYPE_MULTILANGTEXTFIELD = 36;
    /// <summary>基础资料文本字段</summary>
    public const int ELEMENTTYPE_BASEDATATEXTFIELD = 42;
    /// <summary>单位类型字段</summary>
    public const int ELEMENTTYPE_UNITFIELD = 46;
    /// <summary>图章(水印)</summary>
    public const int ELEMENTTYPE_WATERMARK = 80236;
    /// <summary>电子签章</summary>
    public const int ELEMENTTYPE_ESIGNATURE = 82479;
    /// <summary>单选按钮组</summary>
    public const int ELEMENTTYPE_RADIOGROUPFIELD = 32;
    /// <summary>单选按钮</summary>
    public const int ELEMENTTYPE_RADIOFIELD = 25;
    /// <summary>单分录单据体</summary>
    public const int ELEMENTTYPE_SINGLEROWENTITY = 80;
    /// <summary>打印次数</summary>
    public const int ELEMENTTYPE_PRINTTIMES = 82469;
    /// <summary>打印时间</summary>
    public const int ELEMENTTYPE_PRINTDATETIME = 82472;
    /// <summary>表格图片</summary>
    public const int ELEMENTTYPE_PICTURE = 82473;
    /// <summary>私有下拉列表</summary>
    public const int ELEMENTTYPE_PRIVATECOMBO = 2011;
    /// <summary>富文本内容编辑</summary>
    public const int ELEMENTTYPE_LARGERICHTEXTFIELD = 85;
    /// <summary>组合字段</summary>
    public const int ELEMENTTYPE_COMBINEFIELD = 1800;
    /// <summary>维度关联字段。</summary>
    public const int ELEMENTTYPE_RELATEDFLEXGROUPFIELD = 60523;
    /// <summary>打印人</summary>
    public const int ELEMENTTYPE_PRINTER = 84571;
    /// <summary>套打导出次数</summary>
    public const int ELEMENTTYPE_PRINTEXPORTTIMES = 84865;
    /// <summary>树形子单据体</summary>
    public const int ELEMENTTYPE_TREESUBENTRY = 88;
    /// <summary>移动代理分录</summary>
    public const int ELEMENTTYPE_MOBILEPROXYENTRY = 1064;
    /// <summary>元素类型常量_单据模版</summary>
    public const int ELEMENTTYPE_BILL_MODEL = -100;
    /// <summary>元素类型常量_动态表单</summary>
    public const int ELEMENTTYPE_DYNAMICFORM = 500;
    public const int ELEMENTTYPE_DYNAMICFILTER = 502;
    /// <summary>套打</summary>
    public const int ELEMENTTYPE_Note = 600;
    /// <summary>元素类型常量_对话框</summary>
    public const int ELEMENTTYPE_DIALOG = 220;
    /// <summary>元素类型常量_混合界面</summary>
    public const int ELEMENTTYPE_COMBINUI = 210;
    /// <summary>元素类型常量_业务单据</summary>
    public const int ELEMENTTYPE_BILL = 100;
    /// <summary>
    /// 
    /// </summary>
    public const int ELEMENTTYPE_FLEX = 800;
    /// <summary>元素类型常量_日志单据</summary>
    public const int ELEMENTTYPE_LOGBILL = 2200;
    /// <summary>元素类型常量_基础资料</summary>
    public const int ELEMENTTYPE_BASE = 400;
    /// <summary>辅助资料</summary>
    public const int ELEMENTTYPE_ASSISTANTDATA = 401;
    /// <summary>核算项目</summary>
    public const int ELEMENTTYPE_ITEMCLASS = 402;
    /// <summary>元素类型常量_过滤条件</summary>
    public const int ELEMENTTYPE_FILTER = 200;
    /// <summary>元素类型常量_工作流</summary>
    public const int ELEMENTTYPE_WORKFLOW = 300;
    /// <summary>元素类型常量_帐表</summary>
    public const int ELEMENTTYPE_SYSREPORT = 900;
    /// <summary>元素类型常量_简单汇总账表</summary>
    public const int ELEMENTTYPE_EASYSUMMARYREPORT = 901;
    /// <summary>元素类型常量_简单明细账表</summary>
    public const int ELEMENTTYPE_EASYDETAILREPORT = 902;
    /// <summary>元素类型常量_简单交叉账表</summary>
    public const int ELEMENTTYPE_EASYCROSSREPORT = 903;
    /// <summary>元素类型常量_万能报表</summary>
    public const int ELEMENTTYPE_WNREPORT = 1600;
    /// <summary>元素类型常量_BOS表达式</summary>
    public const int ELEMENTTYPE_BOSEXPRESSION = 1200;
    /// <summary>元素类型常量_电子表格</summary>
    public const int ELEMENTTYPE_GRID = 1000;
    public const int ELEMENTTYPE_SIMPLESYSREPORT = 900;
    public const int ELEMENTTYPE_TREESYSREPORT = 901;
    public const int ELEMENTTYPE_PAEGEDSYSREPORT = 902;
    public const int ELEMENTTYPE_CROSSREPORT = 904;
    /// <summary>SQL帐表</summary>
    public const int ELEMENTTYPE_SQLREPORT = 903;
    /// <summary>元素类型常量_单据转换</summary>
    public const int ELEMENTTYPE_CONVERT = 700;
    /// <summary>元素类型常量_状态迁移图</summary>
    public const int ELEMENTTYPE_TRACKER = 710;
    /// <summary>元素类型常量_单据头</summary>
    public const int ELEMENTTYPE_BILLHEAD = 34;
    /// <summary>元素类型常量_子单据头</summary>
    public const int ELEMENTTYPE_SUBBILLHEAD = 38;
    /// <summary>元素类型常量_单据体</summary>
    public const int ELEMENTTYPE_BILLBODY = 35;
    /// <summary>元素类型常量_树形单据体</summary>
    public const int ELEMENTTYPE_TREEBILLBODY = 48;
    /// <summary>元素类型常量_子单据体</summary>
    public const int ELEMENTTYPE_SUBBILLBODY = 60502;
    /// <summary>元素类型常量_甘特图单据体</summary>
    public const int ELEMENTTYPE_GANTTCHART = 60530;
    /// <summary>元素类型常量_过滤器定制页签</summary>
    public const int ELEMENTTYPE_CUSTOMFILTERPANEL = 201;
    /// <summary>元素类型常量_过滤器过滤条件面板</summary>
    public const int ELEMENTTYPE_FILTERPANEL = 202;
    /// <summary>元素类型常量_过滤器排序面板</summary>
    public const int ELEMENTTYPE_SORTPANEL = 203;
    /// <summary>元素类型常量_过滤器汇总面板</summary>
    public const int ELEMENTTYPE_GROUPPANEL = 204;
    /// <summary>元素类型常量_参数面板</summary>
    public const int ELEMENTTYPE_COMBINUITOPPANEL = 211;
    /// <summary>元素类型常量_插件页签</summary>
    public const int ELEMENTTYPE_COMBINUIPLUGIN = 212;
    /// <summary>元素类型常量_页签控件</summary>
    public const int ELEMENTTYPE_TABCONTROL = 1005;
    /// <summary>元素类型常量_子页签</summary>
    public const int ELEMENTTYPE_TABPAGE = 1004;
    /// <summary>元素类型常量_单据编号</summary>
    public const int ELEMENTTYPE_BILLNO = 12;
    /// <summary>链接控件</summary>
    public const int ELEMENTTYPE_LINKBTN = 1014;
    /// <summary>按钮控件</summary>
    public const int ELEMENTTYPE_BUTTON = 1002;
    /// <summary>源单类型字段</summary>
    public const int ELEMENTTYPE_SOURCEBILLTYPEFIELD = 50;
    /// <summary>元素类型常量_是否多组织</summary>
    public const int ELEMENTTYPE_ISMULTIORG = 12088;
    /// <summary>元素类型常量_当前组织</summary>
    public const int ELEMENTTYPE_CURRENTORGID = 12078;
    /// <summary>元素类型常量_主菜单</summary>
    public const int BarItemElementType_MenuBar = 2000;
    /// <summary>元素类型常量_工具栏</summary>
    public const int BarItemElementType_ToolBar = 2001;
    /// <summary>元素类型常量_右键菜单</summary>
    public const int BarItemElementType_PopupMenu = 2002;
    /// <summary>元素类型常量_状态栏</summary>
    public const int BarItemElementType_StatusBar = 2003;
    /// <summary>元素类型常量_分割菜单</summary>
    public const int BarItemElementType_Seperator = 2004;
    /// <summary>元素类型常量_按钮菜单</summary>
    public const int BarItemElementType_Button = 2005;
    public const int BarItemElementType_SplitButton = 2018;
    /// <summary>元素类型常量_复选菜单</summary>
    public const int BarItemElementType_Check = 2006;
    /// <summary>元素类型常量_下拉框菜单</summary>
    public const int BarItemElementType_Combox = 2007;
    /// <summary>元素类型常量_下拉按钮菜单</summary>
    public const int BarItemElementType_DropDownButton = 2008;
    /// <summary>元素类型常量_子下拉按钮菜单</summary>
    public const int BarItemElementType_SubDropDownButton = 2009;
    /// <summary>元素类型常量_文本框菜单</summary>
    public const int BarItemElementType_TextField = 2010;
    /// <summary>元素类型常量_子菜单</summary>
    public const int BarItemElementType_SubItem = 2015;
    /// <summary>元素类型常量_子分类菜单</summary>
    public const int BarItemElementType_SubCategory = 2016;
    /// <summary>表单上的向导步骤元素，便于构建向导式表单应用</summary>
    public const int FormElement_WizardStep = 2017;



    /// <summary>工具栏可见</summary>
    public bool Visible { get; set; }

    /// <summary>元素在具体领域模型中的Id</summary>
    public int EntryId { get; set; }

    /// <summary>元素类型Id</summary>
    public int Id { get; set; }

    /// <summary>图标</summary>
    public string ImgKey { get; set; }

    /// <summary>名称</summary>
    public LocaleValue Name { get; set; }

    public LocaleValue Description { get; set; }

    /// <summary>工具栏顺序</summary>
    public int Seq { get; set; }

    /// <summary>元素分类：如业务对象、分录、控件、字段、菜单等等</summary>
    public int Type { get; set; }

    /// <summary>元素业务类名</summary>
    public string ElementClass { get; set; }

    /// <summary>元素外观类名</summary>
    public string AppearanceClass { get; set; }

    /// <summary>元素所在分组</summary>
    public int GroupID { get; set; }

}